﻿using ModelLayer;
using System.Collections.Generic;

namespace ControllerLayer
{
    internal interface IPersonCtr
    {
        /// <summary>
        /// inserts a new customer to the database with information coming from a customer object
        /// </summary>
        /// <param name="customer">The customer.</param>
        /// <returns>The number of affected rows</returns>
        int CreateCustomer(Customer customer);

        /// <summary>
        /// Returns a single customer from a given id
        /// </summary>
        /// <param name="id">The identifier.</param>
        /// <returns>Customer.</returns>
        Customer GetCustomer(long id);

        /// <summary>
        /// updates an existing customer in the database with information coming from a customer
        /// object
        /// </summary>
        /// <param name="customer">The customer.</param>
        /// <returns>The number of affected rows</returns>
        int UpdateCustomer(Customer customer);

        /// <summary>
        /// Deletes a customer from the database
        /// </summary>
        /// <param name="customerId">The customer id.</param>
        /// <returns>The number of affected rows</returns>
        int DeleteCustomer(long customerId);

        /// <summary>
        /// gets a list containing all customers in the database
        /// </summary>
        /// <returns>List{Customer}.</returns>
        List<Customer> GetAllCustomer();
    }
}